#ifndef MYARRAY_H
#define MYARRAY_H

class MyArray {
private:
	int* p;
	int N;

public:
	MyArray(int size = 0);                   
		MyArray(const MyArray& other);
	~MyArray();

	MyArray merge(const MyArray& other) const;

	MyArray add(const MyArray& other) const;
	MyArray subtract(const MyArray& other) const;
	MyArray multiply(const MyArray& other) const;
	MyArray divide(const MyArray& other) const;

	int getSize() const { return N; }
	int getElement(int index) const { return (index >= 0 && index < N) ? p[index] : 0; }
	void setElement(int index, int value) { if (index >= 0 && index < N) p[index] = value; }
};

#endif 
